#include <stdio.h>
#define N 100
void BubbleSort(int s[],int n)
{
    int i,j,temp;
    for(i=1;i<n;i++)
    {
        for(j=0;j<n-i;j++)
        {
            if(s[j]>s[j+1])
            {
                temp=s[j];
                s[j]=s[j+1];
                s[j+1]=temp;
            }
        }
    }
}
void ReadScore(int score[],int n)
{
    int i;
    for(i=0;i<n;i++)
    {
        printf("please input the No.%d number:",i+1);
        scanf("%d",&score[i]);
    }
}
void OutScore(int score[],int n)
{
    int i;
    for(i=0;i<n;i++)
    {
        printf("%d ",score[i]);
    }
}
void main()
{
    int s[N],n;
    printf("please input how many numbers you want to input:");
    scanf("%d",&n);
    ReadScore(s,n);
    BubbleSort(s,n);
    OutScore(s,n);
}
